///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar  6 2009)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "mainframegui.h"

#include "res/calculator64.xpm"
#include "res/filenew.xpm"
#include "res/fileopen.xpm"
#include "res/filesave.xpm"

///////////////////////////////////////////////////////////////////////////

MainFrameGui::MainFrameGui( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	m_menuBar = new wxMenuBar( 0 );
	m_menuFile = new wxMenu();
	wxMenuItem* m_menuFileNew;
	m_menuFileNew = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("New ...") ) + wxT('\t') + wxT("CTRL+N"), wxEmptyString, wxITEM_NORMAL );
	m_menuFile->Append( m_menuFileNew );
	
	wxMenuItem* m_menuFileOpen;
	m_menuFileOpen = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("Open") ) + wxT('\t') + wxT("CTRL+O"), _("Open a project database"), wxITEM_NORMAL );
	m_menuFile->Append( m_menuFileOpen );
	
	m_menuRecentFiles = new wxMenu();
	m_menuFile->Append( -1, _("Recent files"), m_menuRecentFiles );
	
	wxMenuItem* m_separator1;
	m_separator1 = m_menuFile->AppendSeparator();
	
	wxMenuItem* menuFileExit;
	menuFileExit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("E&xit") ) + wxT('\t') + wxT("Alt+X"), wxEmptyString, wxITEM_NORMAL );
	m_menuFile->Append( menuFileExit );
	
	m_menuBar->Append( m_menuFile, _("&File") );
	
	m_menuEdit = new wxMenu();
	wxMenuItem* m_menuNewProject;
	m_menuNewProject = new wxMenuItem( m_menuEdit, wxID_ANY, wxString( _("New project ...") ) + wxT('\t') + wxT("ALT+P"), wxEmptyString, wxITEM_NORMAL );
	m_menuEdit->Append( m_menuNewProject );
	
	wxMenuItem* m_menuNewWorkRequest;
	m_menuNewWorkRequest = new wxMenuItem( m_menuEdit, wxID_ANY, wxString( _("New work request ...") ) + wxT('\t') + wxT("ALT+W"), wxEmptyString, wxITEM_NORMAL );
	m_menuEdit->Append( m_menuNewWorkRequest );
	
	wxMenuItem* m_menuEditNewCost;
	m_menuEditNewCost = new wxMenuItem( m_menuEdit, wxID_ANY, wxString( _("New cost ...") ) + wxT('\t') + wxT("ALT+C"), wxEmptyString, wxITEM_NORMAL );
	m_menuEdit->Append( m_menuEditNewCost );
	
	m_menuBar->Append( m_menuEdit, _("&Edit") );
	
	m_menuView = new wxMenu();
	m_menuItemViewCost = new wxMenuItem( m_menuView, ID_MENU_VIEW_COST, wxString( _("Cost") ) , wxEmptyString, wxITEM_CHECK );
	m_menuView->Append( m_menuItemViewCost );
	m_menuItemViewCost->Check( true );
	
	m_menuItemViewSummary = new wxMenuItem( m_menuView, ID_MENU_VIEW_SUMARY, wxString( _("Summary") ) , wxEmptyString, wxITEM_CHECK );
	m_menuView->Append( m_menuItemViewSummary );
	m_menuItemViewSummary->Check( true );
	
	m_menuItemViewTask = new wxMenuItem( m_menuView, ID_MENU_VIEW_TASK, wxString( _("Task") ) , wxEmptyString, wxITEM_CHECK );
	m_menuView->Append( m_menuItemViewTask );
	m_menuItemViewTask->Check( true );
	
	m_menuItemViewWorkRequest = new wxMenuItem( m_menuView, ID_MENU_VIEW_WORKREQUEST, wxString( _("Work request") ) , wxEmptyString, wxITEM_CHECK );
	m_menuView->Append( m_menuItemViewWorkRequest );
	m_menuItemViewWorkRequest->Check( true );
	
	m_menuItemViewTag = new wxMenuItem( m_menuView, ID_MENU_VIEW_TAG, wxString( _("Tag") ) , wxEmptyString, wxITEM_CHECK );
	m_menuView->Append( m_menuItemViewTag );
	m_menuItemViewTag->Check( true );
	
	wxMenuItem* m_separator2;
	m_separator2 = m_menuView->AppendSeparator();
	
	m_menuItemViewLog = new wxMenuItem( m_menuView, ID_MENU_VIEW_LOG, wxString( _("Log") ) , wxEmptyString, wxITEM_CHECK );
	m_menuView->Append( m_menuItemViewLog );
	m_menuItemViewLog->Check( true );
	
	m_menuBar->Append( m_menuView, _("&View") );
	
	m_menuHelp = new wxMenu();
	wxMenuItem* m_menuHelpAbout;
	m_menuHelpAbout = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("About ...") ) + wxT('\t') + wxT("F1"), _("About ProjectManager"), wxITEM_NORMAL );
	m_menuHelp->Append( m_menuHelpAbout );
	
	m_menuBar->Append( m_menuHelp, _("&Help") );
	
	this->SetMenuBar( m_menuBar );
	
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	this->SetSizer( mainSizer );
	this->Layout();
	m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
	m_toolbar = this->CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL, wxID_ANY ); 
	m_toolbar->AddTool( ID_PM_FILE_NEW, wxEmptyString, wxBitmap( filenew_xpm ), wxNullBitmap, wxITEM_NORMAL, _("New"), _("New") );
	m_toolbar->AddTool( ID_PM_FILE_OPEN, wxEmptyString, wxBitmap( fileopen_xpm ), wxNullBitmap, wxITEM_NORMAL, _("Open"), _("Open") );
	m_toolbar->AddTool( ID_PM_FILE_SAVE, wxEmptyString, wxBitmap( filesave_xpm ), wxNullBitmap, wxITEM_NORMAL, _("Save"), _("Save") );
	m_toolbar->AddSeparator();
	wxArrayString m_listProjectChoices;
	m_listProject = new wxChoice( m_toolbar, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_listProjectChoices, 0 );
	m_listProject->SetSelection( 0 );
	m_toolbar->AddControl( m_listProject );
	m_toolbar->Realize();
	
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrameGui::OnCloseFrame ) );
	this->Connect( m_menuFileNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnFileNew ) );
	this->Connect( m_menuFileOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnFileOpen ) );
	this->Connect( menuFileExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnExitClick ) );
	this->Connect( m_menuEditNewCost->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnNewCost ) );
	this->Connect( m_menuItemViewCost->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Connect( m_menuItemViewCost->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Connect( m_menuItemViewSummary->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Connect( m_menuItemViewSummary->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Connect( m_menuItemViewTask->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Connect( m_menuItemViewTask->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Connect( m_menuItemViewWorkRequest->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Connect( m_menuItemViewWorkRequest->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Connect( m_menuItemViewTag->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Connect( m_menuItemViewTag->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Connect( m_menuItemViewLog->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Connect( m_menuItemViewLog->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Connect( m_menuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnAbout ) );
	this->Connect( ID_PM_FILE_NEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameGui::OnFileNew ) );
	this->Connect( ID_PM_FILE_OPEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameGui::OnFileOpen ) );
	this->Connect( ID_PM_FILE_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameGui::OnFileSave ) );
}

MainFrameGui::~MainFrameGui()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrameGui::OnCloseFrame ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnFileNew ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnFileOpen ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnExitClick ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnNewCost ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnMenuViewSelection ) );
	this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrameGui::OnMenuViewUpdateUI ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameGui::OnAbout ) );
	this->Disconnect( ID_PM_FILE_NEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameGui::OnFileNew ) );
	this->Disconnect( ID_PM_FILE_OPEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameGui::OnFileOpen ) );
	this->Disconnect( ID_PM_FILE_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameGui::OnFileSave ) );
}

DlgAboutGui::DlgAboutGui( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxHORIZONTAL );
	
	wxStaticBitmap* m_bitmap1;
	m_bitmap1 = new wxStaticBitmap( this, wxID_ANY, wxBitmap( calculator64_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer3->Add( m_bitmap1, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxVERTICAL );
	
	wxStaticText* m_staticText1;
	m_staticText1 = new wxStaticText( this, wxID_ANY, _("Project Manager"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );
	m_staticText1->SetFont( wxFont( 12, 70, 90, 92, false, wxEmptyString ) );
	
	bSizer4->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	
	bSizer4->Add( 0, 15, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer6;
	bSizer6 = new wxBoxSizer( wxHORIZONTAL );
	
	wxStaticText* m_staticText4;
	m_staticText4 = new wxStaticText( this, wxID_ANY, _("Version :"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText4->Wrap( -1 );
	bSizer6->Add( m_staticText4, 0, wxALL, 5 );
	
	m_labelVersion = new wxStaticText( this, wxID_ANY, _("XXX"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labelVersion->Wrap( -1 );
	bSizer6->Add( m_labelVersion, 0, wxALL, 5 );
	
	bSizer4->Add( bSizer6, 0, wxEXPAND, 5 );
	
	wxStaticText* m_staticText3;
	m_staticText3 = new wxStaticText( this, wxID_ANY, _("By Jérémie Fouché"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText3->Wrap( -1 );
	bSizer4->Add( m_staticText3, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxHORIZONTAL );
	
	wxStaticText* m_staticText2;
	m_staticText2 = new wxStaticText( this, wxID_ANY, _("Web site :"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText2->Wrap( -1 );
	bSizer5->Add( m_staticText2, 0, wxALL, 5 );
	
	wxHyperlinkCtrl* m_hyperlink1;
	m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://code.google.com/p/projectmgr/"), wxT("http://code.google.com/p/projectmgr/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
	bSizer5->Add( m_hyperlink1, 0, wxALL, 5 );
	
	bSizer4->Add( bSizer5, 0, wxEXPAND, 5 );
	
	bSizer3->Add( bSizer4, 1, wxEXPAND, 5 );
	
	bSizer2->Add( bSizer3, 1, wxEXPAND, 5 );
	
	wxStaticLine* m_staticline1;
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer2->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
	
	wxButton* m_btnOK;
	m_btnOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
	m_btnOK->SetDefault(); 
	bSizer2->Add( m_btnOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	this->SetSizer( bSizer2 );
	this->Layout();
	bSizer2->Fit( this );
}

DlgAboutGui::~DlgAboutGui()
{
}
